#include<func.h>

void *pthead_func(void *p)
{
    printf("main num=%ld\n",(long)p);//直接取值传递，并强转为long
    return (void*)2;

}

int main()
{
    pthread_t pthid;
    int ret=pthread_create(&pthid,NULL,pthead_func,(void*)1);
    THREAD_ERR_CHECK(ret,"pthread_create")
    long pthread_return;
    ret=pthread_join(pthid,(void **)&pthread_return);//取值传递
    THREAD_ERR_CHECK(ret,"pthread_join")
    printf("child return=%ld\n",pthread_return);
    return 0;
}